package com.winhxd.b2c.customer.service;

import com.winhxd.b2c.common.domain.PagedList;
import com.winhxd.b2c.common.domain.customer.condition.*;
import com.winhxd.b2c.common.domain.customer.model.CustomerUserInfo;
import com.winhxd.b2c.common.domain.customer.vo.*;
import com.winhxd.b2c.common.domain.system.login.condition.BackStageCustomerInfoCondition;
import com.winhxd.b2c.common.domain.system.user.model.SysUser;

import java.util.List;

/**
 * @author chengyy
 * @Description: 小程序用户服务接口类
 * @date 2018/8/6 9:23
 */
public interface CustomerService {

    /**
     * @param condition 参数对象
     * @return sql语句执行之后影响的行数
     * @author chengyy
     * @date 2018/8/6 13:54
     * @Description 跟新用户的状态，有效，无效
     */
    int modifyCustomerStatus(BackStageCustomerInfoCondition condition);

    /**
     * @param ids 用户id
     * @return 用户信息
     * @author chengyy
     * @date 2018/8/6 15:31
     * @Description 根据id批量查询用户信息
     */
    List<CustomerUserInfoVO> findCustomerUserByIds(List<Long> ids);

    /**
     * @param ids 用户id
     * @return 用户信息
     * @author chengyy
     * @date 2018/8/6 15:31
     * @Description 根据用户id批量查询用户信息 返回所属店铺名称
     */
    List<CustomerUserInfoVO> findCustomerUserStoreByIds(List<Long> ids);

    /**
     * 运营首页统计
     */
    CustomerOperationHomePageVO findOperationHomePage();

    /**
     *
     * @param customerUserInfo
     * @return
     */
    CustomerUserInfoSimpleVO saveCustomerStoreOpne(CustomerUserInfo customerUserInfo);

    /**
     *  给一级分销商和二级分销商开通后台登录账号
     * @param customerUserInfo
     */
    Boolean saveSystemUser(CustomerUserInfo customerUserInfo,SysUser parentSysUser,Long id,String operationName);
    /**
     *  给一级分销商和二级分销商开通后台登录账号
     * @param customerUserInfo
     */
    void updateSystemUser(CustomerUserInfo customerUserInfo);

    /**
     * 查询会员邀请过去人，然后更新他们的父级用户
     * @param condition
     */
    void modifyCustomerParentIdById(InvitationRecordCondition condition);

    /**
     * 查询统计当前用户下面的新会员 老会员  当日访问记录
     * @param condition
     * @return
     */
    CustomerTotalVO getCustomerTotalById(CustomerTotalCondition condition);

    /**
     * 分销商/会员基本信息 统计
     * @author: wangbaokuo
     * @date: 2019/1/11 11:13
     * @param:
     * @return:
     */
    List<CustomerBaseCollectVO> findCustomerWallet(CustomerWalletCondition condition);

    /**
     * 分销商/会员详情-收益日志
     * @author: wangbaokuo
     * @date: 2019/1/11 14:03
     * @param:
     * @return:
     */
    PagedList<CustomerRevenueDetailVO> getUserRevenueDetail(CustomerRevenueDetailCondition id);

    /**
     * 分销商/会员详情-积分日志
     * @author: wangbaokuo
     * @date: 2019/1/11 14:03
     * @param:
     * @return:
     */
    PagedList<CustomerIntegralDetailVO> getUserIntegralDetail(CustomerIntegralDetailCondition id);

    /**
     * 提现列表
     * @author: wangbaokuo
     * @date: 2019/1/11 16:19
     * @param:
     * @return:
     */
    PagedList<CustomerWithdrawalsVO> findPayWithdrawals(CustomerWithdrawalsCondition condition);

    /**
     * 提现审核
     * @author: wangbaokuo
     * @date: 2019/1/11 16:19
     * @param:
     * @return:
     */
    Integer auditPayWithdrawals(CustomerAuditCondition condition);

    /**
     * 查询后台首页未审核的提现申请数
     *
     * @return
     */
    Integer getWithdrawDepositNum();


    /**
     * 查询是否存在手机号
     * @param
     */
    int countCheckMobileNumber( Long id, String mobile);
}
